﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<GabageFactory.Models.EventRecordDetail>" %>
<%@ Import Namespace="System.Collections.Generic" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	结束事件
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript">
        function setCenter(Xelement) {
            var parent = Xelement.parentNode;
            parent.style.position = "relative";
            Xelement.style.position = "absolute";
            var left = (parent.clientWidth - Xelement.clientWidth) / 2;
            var top = (parent.clientHeight - Xelement.clientHeight) / 2;
            Xelement.style.left = left + "px";
            Xelement.style.top = top + "px";
        }
    </script>
    
    <% 
        User user = (User)ViewData["user"];
        EventDailyRecord dailyRecord = (EventDailyRecord) ViewData["dailyRecord"];
        string[] types = (string[])ViewData["types"];
        string[] priorities = (string[])ViewData["priorites"];
        using (Html.BeginForm())
    {%>
        <%= Html.ValidationSummary(true) %>
        <%= Html.Hidden("eventId", Model.Id)%>
        <%= Html.Hidden("id", dailyRecord.Id)%>
        <%= Html.Hidden("status", Model.Status)%>
            
    <table cellpadding="4" cellspacing="0" class="com_detail_table" style="width:956px;">
        <tr>
            <th colspan="10">结束事件</th>
        </tr>
        <tr>
            <td>事件名称:</td>
            <td colspan="9"><%=Model.Name%></td>
        </tr>
        <tr>
            <td>事件现场：</td>
            <td colspan="9">
                <%=Model.StackName %>
            </td>
        </tr>
        <tr>
            
            <td>事件类别：</td>
            <td><%=types[Model.Type] %></td>
            <td>事件级别</td>
            <td><%=priorities[Model.Priority] %></td>
            <td>上报人</td>
            <td><%=Model.UserName%></td>
            <td>上报时间:</td>
            <td><%=Model.OccurredDate.ToString("yyyy-MM-dd HH:mm") %></td>
            <td>延续天数:</td>
            <td><%=(DateTime.Now.Date - Model.OccurredDate.Date).Days + 1 %>天</td>
        </tr>
        <tr>
            <td>事件总结：</td>
            <td colspan="9"><%=Html.TextArea("EventDesc", dailyRecord.Description, new { rows = 5, cols = 100 })%></td>
        </tr>
    </table>
    
    <div class="submit_btn_area" style="margin-left:112px;">
        <input type="submit"id="submit" value="确 认" />
    </div>
    <% } %>
</asp:Content>
